package com.thz.system.manager;

import com.thz.common.core.constants.CacheConstants;
import com.thz.redis.utlis.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @Author thz
 * @Date 2025/3/29
 */
@Component
public class QuestionCacheManager {
    @Autowired
    private RedisUtil redisService;

    public void addCache(Long questionId) {
        redisService.leftPushForList(CacheConstants.QUESTION_LIST, questionId);
    }

    public void deleteCache(Long questionId) {
        redisService.removeForList(CacheConstants.QUESTION_LIST, questionId);
    }
}
